<?php
defined ('_VALID_MOS') or
    die('Direct Access to this location is not allowed');
?>
<?php
// show the form if available
if(isset($this->form)) {
    echo $this->form;
}
if($this->lists->count() >0):
    $this->DataTables('.adminlist');?>
<div class="ui-widget-content">
    <table class="adminlist" cellspacing="1">
    <thead>
        <tr>
            <th>
                Name
            </th>
            <th width="10%">
                Id
            </th>
            <th width="10%">
                Web Id
            </th>            
            <th>
                Actions
            </th>
        </tr>
    </thead>
    <tbody>
        <?php foreach($this->lists as $list):?>
        <tr>
            <td><?php echo $list->name;?></td>
            <td><?php echo $list->list_id;?></td>
            <td><?php echo $list->web_id;?></td>
            <td>
                <a href="<?php echo $this->Jurl(array(
                        'module'=>'Chimpmail',
                        'controller'=>'lists',
                        'action'=>'modules',
                        'addparams'=> htmlspecialchars(json_encode(array(
                            'list_id'=>$list->list_id,
                            'web_id'=>$list->web_id,
                        ))),
                    ),'administrator',false);?>"
                   class="ui-button ui-corner-all ui-state-default paging_full_numbers">
                    Modules
                </a>
                <a href="<?php echo $this->Jurl(array(
                        'module'=>'Chimpmail',
                        'controller'=>'lists',
                        'action'=>'subscribers',
                        'addparams'=> htmlspecialchars(json_encode(array(
                            'list_id'=>$list->list_id,
                            'web_id'=>$list->web_id,
                        ))),
                    ),'administrator',false);?>"
                   class="ui-button ui-corner-all ui-state-default paging_full_numbers">
                    Subscribers
                </a>
            </td>
        </tr>
        <?php endforeach;?>
    </tbody>
    </table>
</div>
<?php endif;?>
<div class="clr"></div>
<div class="buttons">
    <a href="<?php echo $this->Jurl(array(
                        'module'=>'Chimpmail',
                        'controller'=>'index',
                        'action'=>'adminindex',
                    ),'administrator',false);
            ?>" class="ui-button ui-corner-all ui-state-default paging_full_numbers">
            Back
    </a>
</div>